Socket
Socket
Sign inDemoInstall

@skyscanner/bpk-foundations-web

Package Overview
Dependencies
7
Maintainers
5
Versions
99
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @skyscanner/bpk-foundations-web

Common Backpack design tokens for colors, spacing, font, etc.


Version published
Weekly downloads
2.4K
increased by1.38%
Maintainers
5
Install size
427 kB
Created
Weekly downloads
 

Readme

Source

@skyscanner/bpk-foundations-web

Design tokens for colours, spacing, font, etc.

Installation

npm install @skyscanner/bpk-foundations-web --save-dev

Usage

Sass:

@import '~@skyscanner/bpk-foundations-web/tokens/base.default.scss';

.my-selector {
  padding: $bpk-spacing-base;
}

JavaScript (ES6 module):

For web:

// Individual tokens
import { spacingBase } from '@skyscanner/bpk-foundations-web/tokens/base.es6';

console.log(spacingBase);

// Whole token categories
import { colors } from '@skyscanner/bpk-foundations-web/tokens/base.es6';

console.log(colors.colorSkyGrayTint01);

// All tokens
import * as tokens from '@skyscanner/bpk-foundations-web/tokens/base.es6';

console.log(tokens);

JavaScript (CommonJS):

// Individual tokens
import { spacingBase } from '@skyscanner/bpk-foundations-web/tokens/base.common';

console.log(spacingBase);

// All tokens
import * as tokens from '@skyscanner/bpk-foundations-web/tokens/base.common';

console.log(tokens);

Transparency

It is possible to add opacity to Backpack color tokens as follows:

import { colorSkyBlue } from '@skyscanner/bpk-foundations-web/tokens/base.common';
import { setOpacity } from '@skyscanner/bpk-foundations-web';

const transparentBlue500 = setOpacity(colorSkyBlue, 0.7);

console.log(transparentBlue500);

FAQs

Last updated on 13 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc